package cn.ciis.sys.operationlog;

import cn.ciis.basic.base.BaseController;
import cn.ciis.basic.model.OperationLog;
import cn.ciis.sys.account.AccountAdminService;
import cn.ciis.sys.permission.Notes;
import cn.ciis.sys.permission.Remark;
import com.jfinal.aop.Inject;

/** @author 冉志林 */
public class OperationLogAdminController extends BaseController {
  @Inject
  OperationLogAdminService srv;
  @Inject
  AccountAdminService accountAdminService;

  @Notes(value = "操作日志管理")
  @Remark(value = "操作日志列表")
  public void index() {
    OperationLog mode = getModel(OperationLog.class, "", true);
    set("accountList",accountAdminService.getListAccount());
    kModel(mode, srv.paginate(getInt(PAGENUMBER, 1), getInt(PAGESIZE, 10), mode));
  }

  @Remark(value = "操作日志删除")
  public void deletes(String ids) {
    renderJson(srv.deletes(ids));
  }

  @Remark(value = "清空操作日志")
  public void clearOperationlog() {
    renderJson(srv.clearOperationLog());
  }
}
